package testcase.card;


import java.util.ArrayList;
import java.util.Hashtable;

import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import satir.card.Choice;
import satir.card.Question;

public class Question_getChoices_1 extends TestCase{

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetChoices() {
		class ChoiceStub extends Choice {
			String content;
			public ChoiceStub(String content) {
				super(content, -1, new Hashtable<String, Integer>());
				this.content = content;
			}
			
			public String getContent() {
				return this.content;
			}
		};
		ArrayList<Choice> choices = new ArrayList<Choice>();
		choices.add(new ChoiceStub("Finish"));
		choices.add(new ChoiceStub("Not Finish"));
		Question question = new Question("Please share the interesting story at school.", choices);
		boolean result = (question.getChoices().get(0).getContent()).equalsIgnoreCase("Finish");
		result = (question.getChoices().get(1).getContent()).equalsIgnoreCase("Not Finish");
		assertEquals(result, true);
	}
}
